
#include "tx_api.h"

#include <stdio.h>

/* Define the ThreadX object control blocks...  */
#define THREAD_STACK_SIZE	1024
const static char *thread_name = "UI";
static TX_THREAD        thread_handle;
static UCHAR            thread_stack[THREAD_STACK_SIZE];

/* Define the threads.  */

static void thread_entry(ULONG thread_input)
{
    while(1)
    {

        printf("thread x test %s\r\n",thread_name);
        tx_thread_sleep(1000);
    }
}



void thread_ui_create(void)
{
	UINT status;
	status= tx_thread_create(&thread_handle,
                    (CHAR *)thread_name,
					thread_entry,
                    0,  
                    thread_stack, 
					THREAD_STACK_SIZE,
                    0,
                    0,
                    TX_NO_TIME_SLICE, 
                    TX_AUTO_START);
    printf("create thread %s==>[%d]!\r\n",thread_name,status);
}


